home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.1 [x86]
/
NeXT Step 3.1 Intel.cdr.dmg
/
private
/
etc
/
rc.cdrom.m68k
< prev
next >
Wrap
Text File
|
1993-02-07
|
16KB
|
424 lines
#!/bin/sh -u
#
# CD-ROM Software Installation Procedure
#
# Copyright (C) 1992 by NeXT Computer, Inc. All rights reserved.
#
# This script is invoked automatically when booted from a CD-ROM.
# Trying to run it directly will probably not do what you expect.
HOME=/; export HOME
PATH=/etc:/usr/etc:/bin:/usr/bin:/usr/ucb; export PATH
(
# Exit with status 1 if we get a SIGINT (from, e.g., a ^C being typed).
trap "exit 1" 2
# Check to be sure we're running from a CD-ROM
if [ ! -d /NextCD ]; then
echo
echo "This script is used to install the system software onto a hard"
echo "disk while booted from a CD-ROM. Since you aren't running from"
echo "a CD-ROM, don't run this script."
echo
exit 1
fi
echo
echo "NeXTSTEP Release 3 Installation"
echo
echo "This procedure installs the Release 3 essentials onto your hard"
echo "disk. If you just want to use the CD-ROM as a startup device, use"
echo "the -s flag from the console to start up in single-user mode."
echo
echo "If you would like to install documentation or other system extensions,"
echo "use the packages in /NextCD/Packages once this procedure is complete."
echo
echo "You can cancel this procedure by typing Control-c. If you continue,"
echo "there are a few more questions to answer before any changes are made."
echo
echo "La procedure suivante va installer la version 3 sur votre disque. Nous"
echo "attirons votre attention sur le fait qu'il s'agit bien d'une"
echo "installation complete et non d'une mise a jour. Si vous desirez"
echo "proceder a l'installation de cette version, actionnez la touche 'y'"
echo "(oui), ou 'n' (non) dans le cas contraire, et appuyez sur Return."
echo ""
echo "Diese Prozedur installiert Version 3 auf Ihrer Platte. Es handelt sich"
echo "nicht um einen Upgrade, sondern um eine vollig neue Installation."
echo "Mochten Sie diese Prozedur ausfuhren? Duecken Sie 'y' fur "Ja" oder"
echo "'n' fur "Nein" und anschliessen die Return-Taste."
echo
echo "Questa procedura installa la Versione 3 su disco. Non si tratta di un"
echo "aggiornamento, ma di un'installazione completa. E questa l'operazione"
echo "che vuoi eseguire? Premi 'y' per si e 'n' per no, quindi premi Invio."
echo
echo "Este procedimiento instala la version actualizada 3 en el disco. Es"
echo "una instalacion en si, no una actualizacion. Es esto lo que desea"
echo "hacer? Pulse 'y' para si o 'n' para no y, a continuacion, Intro."
echo
echo "Denna procedur installerar Version 3 pa din disk. Detta ar inte en"
echo "uppgradering utan en helt ny installation. Vill du utfora denna"
echo "installation? Tryck pa 'y' for ja eller 'n' for nej och tryck"
echo "darefter pa Retur."
echo
echo "THIS IS NOT AN UPGRADE. IT IS A COMPLETE INSTALLATION FROM SCRATCH."
echo
fbshow -S -B -E -I "This procedure will install*Release 3 on your disk.*Is that what you want?**Press \`y' or \`n', then Return."
resp=
while [ ${resp}x = x ]; do
echo -n "Is this what you want? (y/n): "
read resp
if [ ${resp}x != yx -a ${resp}x != nx ]; then
resp=
fi
done
if [ ${resp}x != yx ]; then
echo
echo -n "Ok, shutting down..."
fbshow -S -B -E -I "Shutting down..."
halt -e
exit 1
fi
fbshow -S -B -E -I "On which disk should the*software be installed? The*default is \`sd0a'.**Type name, press Return."
echo
echo "Sur quel disque desirez vous installer la version? Le disque selectionne par defaut est sd0a."
echo "Auf welcher Platte soll die Software installiert werden? Die Voreinstellung ist sd0a."
echo "Su quale disco deve essere installato il software? Quello predefinito e sd0a."
echo "En que disco deberia instalarse el software? El valor por defecto es sd0a."
echo "Pa vilken disk ska mjukvaran installeras? Forinstallningen ar sd0a."
echo
diskie=
while [ ${diskie}x = x ]; do
echo -n "On which disk should the software be installed? (default = sd0a): "
read diskie
if [ ${diskie}x = x ]; then
diskie=sd0a
fi
if [ ! -b /dev/${diskie} ]; then
echo "That doesn't seem to be a valid disk; the file /dev/${diskie} doesn't exist."
diskie=
fi
done
echo
echo "If you are already running Release 3, you don't need to erase your"
echo "disk before re-installing the software (however, the directory /private"
echo "WILL BE DELETED whether you erase the disk or not.)"
echo
echo "Voulez-vous initialiser (tout effacer) le disque avant de proceder a l'installation du logiciel?"
echo "Mochten Sie die Platte formatieren (loschen), bevor Sie die Software installieren?"
echo "Vuoi inizializzare (cancellare) il disco prima di installare il software?"
echo "Desea inicializar (borrar) el disco antes de instalar el software?"
echo "Vill du formatera (radera) disken innan du installerar mjukvaran?"
echo
fbshow -S -B -E -I "Do you want to initialize*(erase) the disk before*installing the software?**Press\`y' or \`n', then Return."
doinit=
while [ ${doinit}x = x ]; do
echo -n "Initialize (erase) disk before installing software? (y/n): "
read doinit
if [ ${doinit}x != yx -a ${doinit}x != nx ]; then
doinit=
fi
done
echo
echo "Ready to perform the installation."
echo "Pret pour l'installation. Desirez-vous lancer l'operation?"
echo "Die Installation kann jetzt durchgefuhrt werden. Wirklich durchfuhren?"
echo "Sono pronto a iniziare l'installazione. Vuoi veramente continuare?"
echo "Preparado para la instalacion. Realmente desea hacerlo?"
echo "Klart att installera mjukvaran. Vill du gora detta?"
echo
fbshow -S -B -E -I "Ready to install the system*software. Really do it?**Press \`y' or \`n', then Return."
resp=
while [ ${resp}x = x ]; do
echo -n "Really do it? (y/n): "
read resp
if [ ${resp}x != yx -a ${resp}x != nx ]; then
resp=
fi
done
if [ ${resp}x != yx ]; then
echo
echo -n "Ok, shutting down..."
fbshow -S -B -E -I "Shutting down..."
halt -e
exit 1
fi
# If not re-initializing hard disk, remove /private from it.
if [ ${doinit}x = nx ]; then
echo
echo "Mounting hard disk..."
fbshow -S -B -E -I "Mounting hard disk..."
# We mount -n and avoid writing /etc/mtab because the root
# device is read-only (it's a CD-ROM...).
/etc/mount -n /dev/${diskie} /private/tmp
# Mounted OK? Report if not.
if [ $? -ne 0 ]; then
echo
echo "The hard disk is damaged, and the software can't be installed"
echo "without initializing. Do you want to continue?"
echo
echo "Le disque dur est endommage et doit etre initialise. Voulez-vous poursuivre l'operation?"
echo "Die Festplatte ist beschadigt und muss formatiert werden. Trotzdem fortsetzen?"
echo "Il disco fisso e danneggiato e deve essere inizializzato. Vuoi continuare comunque?"
echo "El disco duro esta danado y debe ser inicializado. Continuar de todas formas?"
echo "Harddisken ar skadad och maste formateras. Vill du fortsatta anda?"
echo
echo -n "Initialize the hard disk? (y/n): "
fbshow -S -B -E -I -s 5 -f Helvetica-BoldOblique \
"Hard disk is damaged!" -f Helvetica \
"Can't continue without*initializing hard disk.*Ok to initialize it?*Press \`y' or \`n', then Return."
read resp
if [ ${resp}x = yx ]; then
doinit=y
else
(echo) > /dev/console
(echo "Load of hard disk aborted; halting...") > /dev/console
fbshow -S -B -E -I "Load aborted, halting..."
halt -e
exit 1
fi
else
if [ -f /private/tmp/usr/lib/NextStep/software_version ]; then
sourcevers=`head -1 /private/tmp/usr/lib/NextStep/software_version`
else
sourcevers="2.0"
fi
if [ "${sourcevers}x" = "3.1x" ]; then
(echo "Removing /private...") > /dev/console
fbshow -S -B -E -I "Removing /private..."
/bin/rm -rf /private/tmp/private
else
echo
echo "The disk you've selected does not contain Release 3.1. You can only install the"
echo "software without erasing the disk when Release 3.1 has been previously installed."
echo
echo "Le disque selectionne ne contient pas la version 3.1. Si vous desirez installer"
echo "le logiciel sans risquer de perdre toutes les donnees sur le disque, vous devez"
echo "d'abord installer la version 3.1."
echo
echo "Die ausgewahlte Platte enthalt nicht Release 3.1. Sie konnen die Software nur"
echo "installieren, wenn Release 3.1 bereits vorher installiert wurde. Ansonsten wird"
echo "die Platte dabei geloscht."
echo
echo "Il disco selezionato non contiene la Versione 3.1. Puoi installare il software"
echo "senza cancellare il contenuto del disco quando la Versione 3.1 e stata installata"
echo "precedentemente."
echo
echo "El disco que ha seleccionado no contiene la version actualizada 3.1. Solamente se"
echo "puede instalar el software sin borrar el disco cuando se haya instalado previamente"
echo "la version actualizada 3.1."
echo
echo "Den disk du har valt innehaller inte version 3.1. Du kan bara installera programvaran"
echo "utan att radera disken om version 3.1 har installerats tidigare."
echo
echo -n "Press Return to shut down: "
read glop
sync
halt
exit 1
fi
fi
fi
(echo) > /dev/console
rootsize=0
# scsimodes -C tells you how big a disk is, in megabytes
disksize=`/usr/etc/scsimodes -C /dev/r${diskie}`
# readlabel -n tells you how many partitions are on a disk, default = 1
numpart=`/NextCD/CDIS/readlabel -n /dev/r${diskie}`
if [ $? -ne 0 ]; then
numpart=1
else
rootsize=`/NextCD/CDIS/readlabel -p /dev/r${diskie}`
# Default to 1 partition if can't determine size of A partition.
if [ $? -ne 0 ]
then
numpart=1
(echo "Cannot read root partition size from label...") > /dev/console
(echo "Treating disk as a single partition.") > /dev/console
fi
fi
# If we're re-initializing the disk, take care of partitioning.
if [ ${doinit}x = yx ]; then
if [ $disksize -gt 500 -a $numpart -eq 2 -a $rootsize -ne 0 ]; then
((
echo "Your disk was previously built with two partitions. Unless"
echo "this computer supports NetBoot clients, it's probably better"
echo "to have only one partition. You can choose to rebuild the"
echo "disk in its current configuration, or to rebuild it with a"
echo "single partition."
echo
echo "Votre disque est divise en deux partitions. Desirez-vous creer une seule partition?"
echo "Ihre Platte hat zwei Partitionen. Mochten Sie sie in eine Partition umwandeln?"
echo "Il tuo disco ha due partizioni; vuoi unificarle?"
echo "El disco tiene dos particiones. Crear solo una?"
echo "Din disk har tva partitioner. Vill du konvertera dessa till en partition?"
echo
echo -n "Initialize the disk with one partition? (y/n): "
fbshow -S -B -E -I "Your disk now has two*partitions. One is preferred.**Build it with one partition?*Press \`y' or \`n', then Return."
read resp
echo
if [ ${resp}x = nx ]; then
exit 1
else
exit 0
fi
) < /dev/console > /dev/console 2>&1 )
if [ $? -eq 0 ]; then
numpart=1;
fi
else
# Support only one partition if disk is 500MB or less.
numpart=1
fi
(echo "Initializing hard disk...") > /dev/console
fbshow -S -B -E -I "Initializing hard disk..."
# Get off the disk before we initialize it!
cd /NextCD
if [ $numpart -eq 2 ]; then
(/usr/etc/disk -i -p $rootsize /dev/r${diskie}) > /dev/console 2>&1
else
(/usr/etc/disk -i /dev/r${diskie}) > /dev/console 2>&1
fi
if [ $? -ne 0 ]; then
(
(
fbshow -S -B -E -s 4 -I -f Helvetica-BoldOblique \
"Installation failed!" -f Helvetica \
"*Couldn't initialize disk.*Press Return to halt."
echo ""
echo "INSTALLATION FAILED - COULD NOT INTIALIZE DISK"
echo "L'INSTALLATION A ECHOUE - L'INITIALISATION DU DISQUE N'A PAS ABOUTI"
echo "INSTALLATION FEHLGESCHLAGEN - PLATTE KONNTE NICHT FORMATIERT WERDEN"
echo "INSTALLAZIONE NON RIUSCITA - NON SONO RIUSCITO A INIZIALIZZARE IL DISCO"
echo "LA INSTALACION HA FALLADO - IMPOSIBLE INICIALIZAR EL DISCO"
echo "INSTALLATIONEN MISSLYCKADES - DISKEN KUNDE INTE FORMATERAS"
echo
echo -n "Press Return to shut down: "
read glop
sync
halt -p
exit 1
) < /dev/console > /dev/console 2>&1)
fi
mount -n /dev/${diskie} /private/tmp
echo
fi
(echo "Installing software...") >/dev/console
fbshow -S -B -E -I "Installing software..."
# First, write the boot block.
disk -b /dev/r${diskie} > /dev/null &>/dev/console
# Next, install the files.
cd /private/tmp
(/NextCD/CDIS/bomcopy /usr/lib/NextStep/BaseSystem.bom / /private/tmp \
> /dev/console 2>&1)
if [ $? -ne 0 ]; then
(
(
fbshow -S -B -E -s 4 -I -f Helvetica-BoldOblique \
"Installation failed!" -f Helvetica \
"*Not enough disk space.*Press Return to halt."
echo ""
echo "INSTALLATION FAILED - PERHAPS NOT ENOUGH DISK SPACE"
echo "L'INSTALLATION A ECHOUE - L'ESPACE DISQUE EST PEUT-ETRE INSUFFISANT"
echo "INSTALLATION FEHLGESCHLAGEN - EVENTUELL NICHT GENUG PLATTENSPEICHER"
echo "INSTALLAZIONE NON RIUSCITA - FORSE LO SPAZIO SU DISCO E INSUFFICIENTE"
echo "LA INSTALACION HA FALLADO - PUEDE QUE NO HAYA ESPACIO SUFICIENTE EN EL DISCO"
echo "INSTALLATIONEN MISSLYCKADES - DISKUTRYMMET KANSKE AR OTILLRACKLIGT"
echo " "
echo "You will have to REPEAT the installation procedure. You can"
echo "either boot single user and remove some files from the hard"
echo "disk first, or ask that the disk be initialized before the"
echo "software is installed."
echo " "
echo -n "Press Return to shut down: "
read glop
sync
halt -p
exit 1
) < /dev/console > /dev/console 2>&1)
fi
# If the disk was partitioned, patch over fstab to include /clients
if [ $numpart -eq 2 ]; then
(echo "Installing two-partition /etc/fstab...") >/dev/console
fbshow -S -B -E -I "Installing /etc/fstab file..."
cp -p /private/etc/fstab.sd660 /private/tmp/private/etc/fstab
fi
if [ -d /Upgrade_3.1.app/Default.upgrade/Languages ]; then
(echo "Checking sizes for languages...") > /dev/console
freekbytes=`/NextCD/CDIS/freespace /dev/r${diskie}`
langkbytes=`du -s /Upgrade_3.1.app/Default.upgrade/Languages | awk '{print $1}'`
(echo "Languages require ${langkbytes}K, and ${freekbytes}K are available.") > /dev/console
if [ $freekbytes -gt `expr $langkbytes + 1000` ]; then
(echo "Installing languages...") > /dev/console
mkdirs /private/tmp/NextLibrary/Receipts
cd /Upgrade_3.1.app/Default.upgrade/Languages
tar cf - *.pkg | (cd /private/tmp/NextLibrary/Receipts; tar xfp -)
else
(echo "There isn't enough space to install all the languages.") > /dev/console
(echo "Checking sizes for English help...") > /dev/console
langkbytes=`du -s /Upgrade_3.1.app/Default.upgrade/Languages/English.pkg | awk '{print $1}'`
(echo "English help requires ${langkbytes}K, and ${freekbytes}K are available.") > /dev/console
if [ $freekbytes -gt `expr $langkbytes + 1000` ]; then
(echo "Installing English help...") > /dev/console
mkdirs /private/tmp/NextLibrary/Receipts
cd /Upgrade_3.1.app/Default.upgrade/Languages
tar cf - English.pkg | (cd /private/tmp/NextLibrary/Receipts; tar xfp -)
else
(echo "There isn't enough space to install English help.") > /dev/console
fi
fi
fi
((
fbshow -S -B -E -s 3 -I -f Helvetica-BoldOblique \
"Installation complete!" -f Helvetica \
"*Press Return to restart."
echo ""
echo "INSTALLATION COMPLETE!"
echo
echo "INSTALLATION TERMINEE! Appuyez sur Return pour relancer le systeme. "
echo "INSTALLATION FERTIG! Duecken Sie die Return-Taste, um neu zu starten."
echo "INSTALLAZIONE COMPLETA! Premi Invio per riavviare."
echo "INSTALACION TERMINADA! Pulse Intro para arrancar."
echo "INSTALLATIONEN KLAR! Tryck pa Retur for att starta om."
echo
echo -n "Press Return to restart from the hard disk: "
read glop
sync ; reboot sd
exit 1
) < /dev/console > /dev/console 2>&1)
) < /dev/console > /dev/console 2>&1
exit 0